//
//  SecondView.m
//  UI16_DouBan
//
//  Created by dllo on 15/11/1.
//  Copyright © 2015年 张磊. All rights reserved.
//

#import "SecondView.h"

@implementation SecondView

- (void)dealloc
{
    [_nameLabel release];
    [_nameTextFild release];
    [_passwordLabel release];
    [_passwordTextFild release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}

- (void)createSubView
{
    
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(30, 120, 100, 30)];
    [self addSubview:self.nameLabel];
    self.nameLabel.text = @"用户名:";
    [_nameLabel release];
    
    self.nameTextFild = [[UITextField alloc]initWithFrame:CGRectMake(self.nameLabel.frame.origin.x + 120, self.nameLabel.frame.origin.y, 200, 30)];
    [self addSubview:self.nameTextFild];
    self.nameTextFild.placeholder = @"请输入用户名";
    self.nameTextFild.borderStyle = UITextBorderStyleRoundedRect;
    
    
    self.passwordLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.nameLabel.frame.origin.x, self.nameLabel.frame.origin.y + 50, self.nameLabel.frame.size.width, self.nameLabel.frame.size.height)];
    [self addSubview:self.passwordLabel];
    self.passwordLabel.text = @"密码:";
    [_passwordLabel release];
    
    self.passwordTextFild = [[UITextField alloc]initWithFrame:CGRectMake(self.nameTextFild.frame.origin.x, self.passwordLabel.frame.origin.y, self.nameTextFild.frame.size.width, self.nameTextFild.frame.size.height)];
    [self addSubview:self.passwordTextFild];
    self.passwordTextFild.placeholder = @"请输入密码";
    self.passwordTextFild.borderStyle = UITextBorderStyleRoundedRect;
    [_passwordLabel release];
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
